
#include "Account.h"
#include "AccountStateNormal.h"
#include <memory>

using namespace npState;
using namespace std;


void doState()
{
    shared_ptr<Account> acc = make_shared<Account>("小强", 0.0);
    acc->setState(make_shared<AccountStateNormal>(acc));

    acc->deposit(1000);
    acc->withdraw(2000);
    acc->deposit(3000);
    acc->withdraw(4000);
    acc->withdraw(1000);
    acc->calcInterest();
}